<?php
    if($detail_blog->num_rows()>0)
    {
        $aRow=$detail_blog->row();
    }
?>
<?php echo form_open_multipart('blog/update_blog/'.$aRow->id)?>
<div id="wrapper-content" >
  <div class="titre_home" >Modifier blog</div>

    <table id="add_Blog" cellpadding="10px" cellspacing="0">
        <tr>
            <td><label for="blog_name">Titre <font color="red">*</font></label></td>
            <td><input type="text" name="blog_name" size="40" value="<?php echo $aRow->name ; ?>" id="blog_name"/>
            <?php echo form_error('blog_name')?></td>
        </tr>
        <tr>
            <td><label for="blog_image">Image<font color="red">*</font></label></td>
            <?php
                $image_path = './assets/img_blog/thumbs/' . $aRow->image;
                if (file_exists($image_path) && $aRow->image!=null) {
                    $image_path = base_url() . 'assets/img_blog/thumbs/' . $aRow->image;

                } else {
                    $image_path =root_url('seatting-falin'). 'assets/noimage.gif';
                }
            ?>     
            <td valign="center"><img src="<?php echo $image_path ;?>" height="150px"  alt=""><input type="file" name="userfile" id="userfile" size="30"/></td>
           
        </tr>
       
        <tr>
            <td><label for="blog_description">Description <font color="red">*</font></label></td>
         </tr>

    </table>

                <?php
                    $data = array('name' => 'blog_description',
                    'id' => 'blog_description',
                    'width' => '450',
                    'height' => '350',
                    'value' => $aRow->description,
                    'type' =>'text'
                    );
                    echo form_fckeditor($data);
                ?>
    <div align="center">  <input type="submit" name="submit" id="submit" value="Update"/></div>
</div>
<?php echo form_close() ?>
